<?php
cmspad_import('widget.Widget');
class ButtonWidget extends Widget{
	
	public $submit;
	
	public $reset;
	
	public function __toString(){
		$html = '<BUTTON';
		if($this->id){
			$html .= ' id="'.$this->id.'"';
		}
		if($this->name){
			$html .= ' name="'.$this->name.'"';
		}
		if($this->class){
			$html .= ' class="'.$this->class.'"';
		}
		if($this->style){
			$html .= ' style="'.$this->style.'"';
		}
		if($this->submit){
			$html .= ' type="submit"';
		}else if($this->reset){
			$html .= ' type="reset"';
		}else if($this->button){
			$html .= ' type="button"';
		}
		$html .= '>';
		$html .= $this->value;
		$html .= '</BUTTON>';
		return $html;
	}
}
?>